package com.lineage.server.model.Instance;

import com.lineage.server.model.L1Object;
import com.lineage.server.templates.L1Npc;
import com.lineage.server.world.World;
import java.util.Iterator;

public class L1DotaInstance extends L1MonsterInstance {
  public L1DotaInstance(L1Npc template) {
    super(template);
    set_storeDroped(false);
    onNpcAI();
  }
  
  public void searchTarget() {
    Iterator<L1Object> iterator = World.get().getVisibleObjects((L1Object)this, 1000).iterator();
    while (iterator.hasNext()) {
      L1Object object = iterator.next();
      if (object instanceof L1NpcInstance) {
        L1NpcInstance npc = (L1NpcInstance)object;
        if (npc.getNpcId() != 95128)
          continue; 
        if (getCurrentHp() > 500) {
          this._hateList.add(npc, 0);
        } else {
          this._hateList.add(npc, getCurrentHp());
        } 
        this._target = npc;
      } 
    } 
  }
}
